package top.lixunda.commerce.common.core.controller.wrapper;

import java.util.List;
import java.util.Map;

/**
 * @author LiXunda
 * @version time:2019/10/14 10:28
 */
@SuppressWarnings({"UnusedReturnValue", "unused"})
public interface IUpdateSqlWrapper<T> extends IAbstractSqlWrapper<T> {

    default IUpdateSqlWrapper<T> set(String column, Object value) {
        getEntityBlock().set(column, value);
        return this;
    }

    default IUpdateSqlWrapper<T> updateAll() {
        getEntityBlock().updateAll();
        return this;
    }

    default IUpdateSqlWrapper<T> updateNotNull() {
        getEntityBlock().updateNotNull();
        return this;
    }

    @Override
    UpdateEntityBlock<T> getEntityBlock();

    BaseDataUpdateSqlWrapper toDataUpdateSqlWrapper();

    @Override
    IUpdateSqlWrapper<T> groupBy(String... column);

    @Override
    IUpdateSqlWrapper<T> orderBy(Map<String, String> map);

    @Override
    IUpdateSqlWrapper<T> orderBy(String column, String value);

    @Override
    IUpdateSqlWrapper<T> orderByAsc(String... columns);

    @Override
    IUpdateSqlWrapper<T> orderByDesc(String... columns);

    @Override
    IUpdateSqlWrapper<T> having(String column);

    @Override
    IUpdateSqlWrapper<T> limit(int start, int count);

    @Override
    IUpdateSqlWrapper<T> allEq(Map<String, Object> map);

    @Override
    IUpdateSqlWrapper<T> eq(String column, Object value);

    @Override
    IUpdateSqlWrapper<T> ne(String column, Object value);

    @Override
    IUpdateSqlWrapper<T> gt(String column, Object value);

    @Override
    IUpdateSqlWrapper<T> ge(String column, Object value);

    @Override
    IUpdateSqlWrapper<T> lt(String column, Object value);

    @Override
    IUpdateSqlWrapper<T> le(String column, Object value);

    @Override
    IUpdateSqlWrapper<T> between(String column, Object value1, Object value2);

    @Override
    IUpdateSqlWrapper<T> notBetween(String column, Object value1, Object value2);

    @Override
    IUpdateSqlWrapper<T> like(String column, String value);

    @Override
    IUpdateSqlWrapper<T> notLike(String column, String value);

    @Override
    IUpdateSqlWrapper<T> likeLeft(String column, String value);

    @Override
    IUpdateSqlWrapper<T> likeRight(String column, String value);

    @Override
    IUpdateSqlWrapper<T> isNull(String... column);

    @Override
    IUpdateSqlWrapper<T> isNotNull(String... column);

    @Override
    IUpdateSqlWrapper<T> in(String column, List<?> values);

    @Override
    IUpdateSqlWrapper<T> notIn(String column, List<?> values);

    @Override
    IUpdateSqlWrapper<T> or();

    @Override
    IUpdateSqlWrapper<T> and();

    @Override
    IUpdateSqlWrapper<T> or(ConditionBlock sqlBlock);

    @Override
    IUpdateSqlWrapper<T> and(ConditionBlock sqlBlock);

    @Override
    T getEntity();

    @Override
    IUpdateSqlWrapper<T> setEntity(T t);
}
